/*
 * MathUtils.hpp
 *
 *  Created on: 21-11-2010
 *      Author: Przemek
 */

#pragma once

#include "geometry/Vector.hpp"
#include "pch.hpp"

/*
 * Math helper class which manages common practices with floating point numbers,
 * a few conversions and other useful operations.
 */
class MathUtils
{
	public:
		static const float PI;
		static const int FULL_CIRCLE_DEGREESES;

	private:
		static const std::vector<Vector> unitCircleCoordinates;
		static const float EPSILON;

	public:
		static bool isNearZero(const float value);
		static bool isEqual(const float first, const float second);

		static float toRadians(float degreeses);
		static float toDegreeses(float radians);
		static float trimToPositiveRadians(float radians);
		static float trimToPositiveDegrees(float degreeses);
		static float trimValue(float value, float min, float max);

		//double values
		static bool areEqual(int count, ...);
		static float max(int count, ...);
		static float min(int count, ...);

		static Vector getUnitCircleCoordinatesForAngle(int angleInDegreeses);
};

